package com.ybwh.springboot2.vueadmin.sys.model.vo.user;

import com.alibaba.fastjson.JSON;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ybwh.springboot2.common.PageParam;
import com.ybwh.springboot2.common.jackson.localdatetime.EndofDayLocalDateTime;
import com.ybwh.springboot2.common.jackson.localdatetime.StartofDayLocalDateTime;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;


@Data
public class UserAccountPageParam extends PageParam {

    /**
     * 账号
     */
    @ApiModelProperty(value = "账号")
    private String account;

    /**
     * 显示名称
     */
    @ApiModelProperty(value = "显示名称")
    private String nickName;
    /**
     * 手机号
     */
    @ApiModelProperty(value = "手机号")
    private String mobile;
    /**
     * 邮箱
     */
    @ApiModelProperty(value = "邮箱")
    private String email;

    @ApiModelProperty(value = "账号类型(root-系统超级管理员,admin-系统管理员,normal-普通账号)")
    private String type;

    @ApiModelProperty(value = "状态：1-启用；0-禁用")
    private Integer status;

    @StartofDayLocalDateTime
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "最小创建时间")
    private LocalDateTime createAtMin;

    @EndofDayLocalDateTime
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "最大创建时间")
    private LocalDateTime createAtMax;


    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }

}